﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using System.Data;
using System.Configuration;

namespace SvOtchet.DataModel.code
{
    public class AllowYear
    {
        public DataTable Select()
        {
            DataTable restable = new DataTable();
            DataSet ds = new DataSet();
            ds.Tables.Add(restable);
            restable.Columns.Add("year");
            int startyear = int.Parse(ConfigurationManager.AppSettings["startyear"]);
            int currentyear = DateTime.Now.Year;
            for (int i = currentyear; i >= startyear; i--)
            {
                restable.Rows.Add(new object[] { i });
            }
            return restable;
        }
    }
}
